play_info = {}
li = []
print("输入stop表示选手成绩录入完毕")
while True:
    name = input("请输入选手名字：")
    if 'stop' == name:
        break
    score = int(input("请输入选手票数："))
    play_info[name] = score
item = play_info.items()
for i in item:
    li.append([i[1], i[0]])
li.sort()
count = len(li) - 1
for j in range(1, len(li) + 1):
    print(f"第{j}名：{li[count][1]},票数为：{li[count][0]}分")
    count -= 1
